VERSION 5.00
Begin VB.Form ControlForm 
   Appearance      =   0  'Flat
   BackColor       =   &H80000005&
   BorderStyle     =   0  'None
   ClientHeight    =   9000
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   12000
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   24
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H8000000D&
   LinkTopic       =   "Form1"
   ScaleHeight     =   9000
   ScaleWidth      =   12000
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin VB.CommandButton NegNonReact_Button 
      Caption         =   "Non-reactive"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   9300
      TabIndex        =   7
      Top             =   660
      Width           =   2235
   End
   Begin VB.CommandButton NegReact_Button 
      BackColor       =   &H000000FF&
      Caption         =   "Reactive"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   9300
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   1860
      Width           =   2235
   End
   Begin VB.CommandButton PosNonReact_Button 
      Caption         =   "Non-reactive"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   6000
      TabIndex        =   5
      Top             =   660
      Width           =   2235
   End
   Begin VB.CommandButton PosReact_Button 
      BackColor       =   &H000000FF&
      Caption         =   "Reactive"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   6000
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   1860
      Width           =   2235
   End
   Begin VCT.TouchScreenListBox AvailableTestsList 
      Height          =   5415
      Left            =   540
      TabIndex        =   3
      Top             =   660
      Width           =   4575
      _ExtentX        =   8070
      _ExtentY        =   9551
   End
   Begin VB.CommandButton Clear_Button 
      Caption         =   "Clear"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   9600
      TabIndex        =   2
      Top             =   6360
      Width           =   1935
   End
   Begin VB.CommandButton Next_Button 
      Caption         =   "Save"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   9600
      TabIndex        =   1
      Top             =   5160
      Width           =   1935
   End
   Begin VB.CommandButton Cancel_Button 
      BackColor       =   &H008080FF&
      Caption         =   "Cancel"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   9600
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   7560
      Width           =   1935
   End
   Begin VB.Label Star3 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "*"
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   1140
      TabIndex        =   20
      Top             =   7980
      Width           =   315
   End
   Begin VB.Label Star2 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "*"
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   1140
      TabIndex        =   19
      Top             =   7500
      Width           =   315
   End
   Begin VB.Label Star1 
      BackColor       =   &H00FFFFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "*"
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   1140
      TabIndex        =   18
      Top             =   7020
      Width           =   315
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Name of Test"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   18
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   600
      TabIndex        =   17
      Top             =   120
      Width           =   2655
   End
   Begin VB.Label PositiveResult_Data 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   3300
      TabIndex        =   16
      Top             =   7500
      Width           =   2295
   End
   Begin VB.Label NegativeResult_Data 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   3300
      TabIndex        =   15
      Top             =   7980
      Width           =   2295
   End
   Begin VB.Label TestName_Data 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   375
      Left            =   3300
      TabIndex        =   14
      Top             =   7020
      Width           =   2295
   End
   Begin VB.Label ClientSexLabel 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Daily Control Test"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1200
      TabIndex        =   13
      Top             =   6660
      Width           =   3015
   End
   Begin VB.Label NewClientCode_Label 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Positive Sample:"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1380
      TabIndex        =   12
      Top             =   7500
      Width           =   1815
   End
   Begin VB.Label ClientCode_Label 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Negative Sample:"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1380
      TabIndex        =   11
      Top             =   7980
      Width           =   1935
   End
   Begin VB.Label ReturnVisit_Label 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   0  'Transparent
      Caption         =   "Name of Test:"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1380
      TabIndex        =   10
      Top             =   7020
      Width           =   1695
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Negative Sample"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   18
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   9180
      TabIndex        =   9
      Top             =   120
      Width           =   2535
   End
   Begin VB.Label Hemastrip_Title 
      BackColor       =   &H00FFFFFF&
      Caption         =   "Positive Sample"
      BeginProperty Font 
         Name            =   "Arial Narrow"
         Size            =   18
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5880
      TabIndex        =   8
      Top             =   120
      Width           =   2775
   End
   Begin VB.Shape Shape2 
      BackColor       =   &H00C0FFFF&
      BackStyle       =   1  'Opaque
      BorderColor     =   &H00000000&
      BorderWidth     =   2
      Height          =   2235
      Left            =   540
      Shape           =   4  'Rounded Rectangle
      Top             =   6420
      Width           =   5655
   End
End
Attribute VB_Name = "ControlForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub AvailableTestsList_click()
   PosNonReact_Button.Enabled = True
   PosReact_Button.Enabled = True
   AvailableTestsList.Enabled = False
   TestName_Data.Caption = AvailableTestsList.Text
   Clear_Button.Enabled = True
   Star1.Visible = False
   Star2.Visible = True
End Sub

Private Sub Cancel_Button_Click()
   HIVMenuForm.Show
   Unload Me
End Sub

Private Sub Clear_Button_Click()
   ResetForm
End Sub

Private Sub Form_Load()
   ResetForm
End Sub

Private Sub NegNonReact_Button_Click()
   NegNonReact_Button.Enabled = False
   NegReact_Button.Enabled = False
   NegativeResult_Data.Caption = "Non-reactive"
   Next_Button.Enabled = True
End Sub

Private Sub NegReact_Button_Click()
   NegNonReact_Button.Enabled = False
   NegReact_Button.Enabled = False
   NegativeResult_Data.Caption = "Reactive"
   Next_Button.Enabled = True
End Sub

Private Sub Next_Button_Click()
   Clear_Button.Enabled = False
   Next_Button.Enabled = False
   Cancel_Button.Enabled = False

   'write the results to the rapidtest table
   
   CnUser.Open ConnectString
   Cmd.CommandText = "UPDATE rapidtest SET " & _
      "CTRL_DATE = '" & StringDate & "', " & _
      "CTRL_TIME = '" & Format(Time(), "Hh:Nn:Ss") & "', " & _
      "POS_RESULT = '" & PositiveResult_Data.Caption & "', " & _
      "NEG_RESULT = '" & NegativeResult_Data.Caption & "' " & _
      "WHERE TEST_NAME = '" & TestName_Data.Caption & "'"
   Cmd.CommandType = adCmdText
   Cmd.ActiveConnection = CnUser
   Cmd.Execute
   CnUser.Close

   HIVMenuForm.Show
   Unload Me
End Sub

Private Sub PosNonReact_Button_Click()
   PosNonReact_Button.Enabled = False
   PosReact_Button.Enabled = False
   NegNonReact_Button.Enabled = True
   NegReact_Button.Enabled = True
   Star2.Visible = False
   Star3.Visible = True
   PositiveResult_Data.Caption = "Non-reactive"
End Sub

Private Sub PosReact_Button_Click()
   PosNonReact_Button.Enabled = False
   PosReact_Button.Enabled = False
   NegNonReact_Button.Enabled = True
   NegReact_Button.Enabled = True
   Star2.Visible = False
   Star3.Visible = True
   PositiveResult_Data.Caption = "Reactive"
End Sub

Private Sub ResetForm()
   PosNonReact_Button.Enabled = False
   PosReact_Button.Enabled = False
   NegNonReact_Button.Enabled = False
   NegReact_Button.Enabled = False
   Clear_Button.Enabled = False
   Next_Button.Enabled = False
   Star1.Visible = True
   Star2.Visible = False
   Star3.Visible = False
   AvailableTestsList.Enabled = True
   AvailableTestsList.DeleteList
   
   TestName_Data.Caption = ""
   PositiveResult_Data.Caption = ""
   NegativeResult_Data.Caption = ""

   CnUser.Open ConnectString
   Cmd.CommandText = "SELECT TEST_NAME FROM rapidtest"
   Cmd.ActiveConnection = CnUser
   Cmd.CommandType = adCmdText
   RsUser.Open Cmd, , adOpenStatic
   While RsUser.EOF = False
      AvailableTestsList.AddItem RsUser(0)
      RsUser.MoveNext
   Wend
   RsUser.Close
   CnUser.Close
End Sub
